package com.ebc.eservice.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ebc.eservice.pojo.EbcCompanyArticle;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ebc.eservice.vo.admin.CompanyAccountRespVo;
import com.ebc.eservice.vo.article.ArticleRespVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 文章信息表 Mapper 接口
 * </p>
 *
 * @author joey
 * @since 2022-09-17
 */
@Mapper
public interface CompanyArticleMapper extends BaseMapper<EbcCompanyArticle> {

    @Update("update ebc_company_article set real_view_num = real_view_num+1 where id = #{articleId}")
    void addViewNum(Integer articleId);

//    List<ArticleRespVo> getArticleList(Integer companyId);

    IPage<ArticleRespVo> getArticleList(Page<ArticleRespVo> page,Integer companyId);
}
